import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 获取中心库与经销商维护信息
export const getStorehouseDealer = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/warehouseDealer`, { params });

// 获取经销商中心库信息
export const getWareHouseByDealerCode = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/warehouseDealer/getWareHouseByDealerCode`, { params });

// 添加中心库id与经销商id查询
export const addStorehouseDealer = params => axios.post(`${SERVER.CMSCLOUD_WMS}/part/warehouseDealer`,  params );

// 修改中心库id与经销商id查询
export const updateStorehouseDealer = params => axios.put(`${SERVER.CMSCLOUD_WMS}/part/warehouseDealer`,  params );

// 批量启用
export const piliangqiyong = params => axios.put(`${SERVER.CMSCLOUD_WMS}/part/warehouseDealer/piliangqiyong`,  params );

// 批量停用
export const piliangtingyong = params => axios.put(`${SERVER.CMSCLOUD_WMS}/part/warehouseDealer/piliangtingyong`,  params );
